Optimal. Leaf size=46 \[ -\frac{2 b n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b^2 n^2}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0348372, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2305, 2304} \[ -\frac{2 b n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b^2 n^2}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2305
Rule 2304
Rubi steps
\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx &=-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{x}+(2 b n) \int \frac{a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac{2 b^2 n^2}{x}-\frac{2 b n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{x}\\ \end{align*}
Mathematica [A] time = 0.0106017, size = 35, normalized size = 0.76 \[ -\frac{\left (a+b \log \left (c x^n\right )\right )^2+2 b n \left (a+b \log \left (c x^n\right )+b n\right )}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.122, size = 704, normalized size = 15.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11781, size = 95, normalized size = 2.07 \begin{align*} -2 \, b^{2}{\left (\frac{n^{2}}{x} + \frac{n \log \left (c x^{n}\right )}{x}\right )} - \frac{b^{2} \log \left (c x^{n}\right )^{2}}{x} - \frac{2 \, a b n}{x} - \frac{2 \, a b \log \left (c x^{n}\right )}{x} - \frac{a^{2}}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.859764, size = 182, normalized size = 3.96 \begin{align*} -\frac{b^{2} n^{2} \log \left (x\right )^{2} + 2 \, b^{2} n^{2} + b^{2} \log \left (c\right )^{2} + 2 \, a b n + a^{2} + 2 \,{\left (b^{2} n + a b\right )} \log \left (c\right ) + 2 \,{\left (b^{2} n^{2} + b^{2} n \log \left (c\right ) + a b n\right )} \log \left (x\right )}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.07547, size = 110, normalized size = 2.39 \begin{align*} - \frac{a^{2}}{x} - \frac{2 a b n \log{\left (x \right )}}{x} - \frac{2 a b n}{x} - \frac{2 a b \log{\left (c \right )}}{x} - \frac{b^{2} n^{2} \log{\left (x \right )}^{2}}{x} - \frac{2 b^{2} n^{2} \log{\left (x \right )}}{x} - \frac{2 b^{2} n^{2}}{x} - \frac{2 b^{2} n \log{\left (c \right )} \log{\left (x \right )}}{x} - \frac{2 b^{2} n \log{\left (c \right )}}{x} - \frac{b^{2} \log{\left (c \right )}^{2}}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15635, size = 116, normalized size = 2.52 \begin{align*} -\frac{b^{2} n^{2} \log \left (x\right )^{2}}{x} - \frac{2 \,{\left (b^{2} n^{2} + b^{2} n \log \left (c\right ) + a b n\right )} \log \left (x\right )}{x} - \frac{2 \, b^{2} n^{2} + 2 \, b^{2} n \log \left (c\right ) + b^{2} \log \left (c\right )^{2} + 2 \, a b n + 2 \, a b \log \left (c\right ) + a^{2}}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]